<template>
    <div class="xl-table">
        <div class="xl-table-content">
            <xlTable
                :columns="columns"
                :dataSource="awardList"
                rowKey="id"
                :pagination="false"
                :loading="false"
                @change="handleTableChange"
                bordered
                :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
            </xlTable>
        </div>
    </div>
</template>

<script>
    import xlMixin from '../../../components/mixin/index'
    export default {
        name: "index",
        mixins: [xlMixin],
        data() {
            return {
                columns: [
                    {
                        title: '序号',
                        key: 'rowIndex',
                        align: "center",
                        fixed: 'left',
                        width: '100px',
                        sorter: (a) => a.id,//排序
                        customRender: function (t, r, index) {
                            return parseInt(index) + 1;
                        }
                    },
                    {
                        title: '奖项名称',
                        dataIndex: 'awardName',
                        type: 'input'
                    },
                    {
                        title: '奖项获得时间',
                        dataIndex: 'awardDate',
                        type: 'date'
                    },
                    {
                        title: '奖项描述',
                        dataIndex: 'awardDescription',
                        fixed: 'right',
                        type: 'input'
                    }
                ]
            }
        },
        props: {
            awardList: {
                type: Array,
                default: []
            }
        },
        created() {
        },
        methods: {
        }
    }
</script>

<style scoped lang="less">
    .xl-table {
        .xl-table-content {
            padding: 16px;
        }
    }
</style>
